package cn.js.sip.rat.system.controller;

import cn.js.sip.rat.system.entity.ConfigInfoEntity;
import cn.js.sip.rat.system.entity.DicDataEntity;
import cn.js.sip.rat.system.page.TableDataInfo;
import cn.js.sip.rat.system.service.ConfigInfoSevice;
import cn.js.sip.rat.system.service.SysDicDataService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName: cn.js.sip.rat.system.controller
 * @Description: TODO
 * @author: xuxiaoli
 * @Date: 2020-01-20   17:17
 */
@Controller
@RequestMapping("system/config")
public class ConfigInfoController extends BaseController {
    private static Logger logger = LoggerFactory.getLogger(ConfigInfoController.class);

    private String prefix = "system/config";

    @Autowired
    private ConfigInfoSevice configInfoSevice;

    @RequiresPermissions("system:config:view")
    @GetMapping()
    public String dictData() {
        return prefix + "/config";
    }

    @PostMapping("/list")
    @RequiresPermissions("system:config:list")
    @ResponseBody
    public TableDataInfo list(ConfigInfoEntity entity) {
        return configInfoSevice.query(entity);
    }
}
